package day17;

import java.util.Scanner;

//杨辉三角变形
public class oj2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            int m = 2*n - 1;
            int[][] a = new int[n][m];
            for(int i = 0;i < n;i++){
                for(int j = 0;j < m;j++) {
                    a[i][j] = 0;
                }
            }
            a[0][0] = 1;
            for(int i = 1;i < n;i++) {
                a[i][0] = a[i][2*i] = 1;
                for(int j = 1;j < 2*i;j++) {
                    if(j == 1) {
                        a[i][j] = a[i-1][j] + a[i-1][j-1];
                    } else {
                        a[i][j] = a[i-1][j] + a[i-1][j-1] + a[i-1][j-2];
                    }
                }
            }
            int k = 0;
            for(;k < m;k++) {
                if(a[n-1][k]%2 == 0) {
                    System.out.println(k+1);
                    break;
                }
            }
            if(k == m) {
                System.out.println(-1);
            }

        }
    }
}
